﻿using System;
using System.Collections.Generic;
using System.Linq;
using NHibernate.Linq;
using System.Collections;
using log4net;
using log4net.Config;

[assembly: log4net.Config.XmlConfigurator(Watch = true)]
[assembly: log4net.Config.Repository()]

namespace IsoCompte.Classe
{
    public class Utilisateur
    {
        public virtual int Id { get; set; }
        public virtual string Login { get; set; }
        public virtual string MotDePasse { get; set; }
        public virtual IList<Compte> Comptes { get; set; }
    }

    public class Compte
    {
        public virtual int Id { get; set; }
        public virtual string Libelle { get; set; }
        public virtual double SoldeInitial { get; set; }
        public virtual string Banque { get; set; }
        public virtual string Guichet { get; set; }
        public virtual string NoCompte { get; set; }
        public virtual string Clef { get; set; }
        public virtual DateTime MinGraphSold { get; set; }
        public virtual DateTime MaxGraphSold { get; set; }
        public virtual double SeuilAlerte { get; set; }
        public virtual double SeuilAlerteFinal { get; set; }
        public virtual string TypEvol { get; set; }
        public virtual string Iban { get; set; }
        public virtual string Bic { get; set; }
        public virtual string Titulaire { get; set; }
        public virtual string Domiciliation { get; set; }
        public virtual Utilisateur Utilisateur { get; set; }
    }

    public class Categorie
    {
        public virtual int Id { get; set; }
        public virtual string Libelle { get; set; }
        public virtual Categorie CategorieParent { get; set; }
    }

    public class ModePaiement
    {
        public virtual int Id { get; set; }
        public virtual string Libelle { get; set; }
        public virtual string Type { get; set; }
    }

    public class Operation
    {
        public virtual int Id { get; set; }
        public virtual DateTime Date { get; set; }
        public virtual string Tiers { get; set; }
        public virtual string Libelle { get; set; }
        public virtual double Montant { get; set; }
        public virtual DateTime? DatePointage { get; set; }
        public virtual ModePaiement ModePaiement { get; set; }
        public virtual Categorie Categorie { get; set; }
        public virtual Compte Compte { get; set; }
    }

    public class Cheque
    {
        public virtual int Id { get; set; }
        public virtual int NumChequier { get; set; }
        public virtual int NumCheque { get; set; }
        public virtual Operation Operation { get; set; }
        public virtual Compte Compte { get; set; }
    }

    public class Echeancier
    {
        public virtual int Id { get; set; }
        public virtual DateTime Prochaine { get; set; }
        public virtual string Tiers { get; set; }
        public virtual string Libelle { get; set; }
        public virtual double Montant { get; set; }
        public virtual int Repete { get; set; }
        public virtual string TypeRepete { get; set; }
        public virtual DateTime? DateFin { get; set; }
        public virtual ModePaiement ModePaiement { get; set; }
        public virtual Categorie Categorie { get; set; }
        public virtual Compte Compte { get; set; }
    }

    public class Lien
    {
        public const string LIEN_VIR_CAC = "VIRCAC";

        public virtual int Id { get; set; }
        public virtual string TypeLien { get; set; }
        public virtual Operation OrigineOperation { get; set; }
        public virtual Operation DestinationOperation { get; set; }
    }

    public class Log
    {
        #region Data Members
        public static readonly ILog Logger = LogManager.GetLogger("IsoCompteLog");
        #endregion
    }
}
